<?php
namespace App\HttpController\Admin;

use App\HttpController\BaseController;
use App\Utility\Filesystem;

class UploadController extends BaseController {



    public function upload(){
        $request = $this->request();
        $file = $request->getUploadedFile('image');
        $return = (new Filesystem($file))->storeAs();
        if($return === false) return $this->writeJson(1,'上传失败');
        return $this->writeJson(0,$return);
    }








}